package com.rightrule.sequence.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @author: xry
 * @version: DataSourceConfig.java 2024/9/25 22:05
 */
@Configuration
public class DataSourceConfig {

    @Bean("sequenceDataSource")
    public DataSource sequenceDataSource() {
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setDriverClassName("com.mysql.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://mysql.sqlpub.com:3306/wuhuichentest?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai");
        dataSource.setUsername("wuhuichen");
        dataSource.setPassword("gL6bKIFMkzUadHzF");
        return dataSource;
    }
}
